home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
MATH
/
FSULTRA1.ZIP
/
DEMO.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-06-18
|
3KB
|
113 lines
{
FSU - ULTRA The greatest random number generator that ever was
or ever will be. Way beyond Super-Duper.
(Just kidding, but we think its a good one.)
Authors: Arif Zaman (arif@stat.fsu.edu) and
George Marsaglia (geo@stat.fsu.edu).
Date: 27 May 1992
Version: 1.05
Copyright: To obtain permission to incorporate this program into
any commercial product, please contact the authors at
the e-mail address given above or at
Department of Statistics and
Supercomputer Computations Research Institute
Florida State University
Tallahassee, FL 32306.
See Also: README for a brief description
ULTRA.DOC for a detailed description
-----------------------------------------------------------------------
}
{ This demo calls the various ULTRA routines as a test }
{$X+}
{$ifdef x} uses ultrax;
{$else} {$ifdef f} uses ultraf;
{$else} {$ifdef fx} uses ultrafx;
{$else} uses ultra;
{$endif}{$endif}{$endif}
var i:integer;
begin
writeln;
writeln('A Sample Printout:');
write('No rinit call: ');
for i:=1 to 10000 do
if (i<4) or (i=10000) then write(i32bit:16) else i32bit;
writeln;
write('Signed 4 byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<4) or (i=10000) then write(i32bit:16) else i32bit;
writeln;
write('Uns. 4 byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<4) or (i=10000) then write(i31bit:16) else i31bit;
writeln;
write('Signed 2 byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<8) or (i=10000) then write(i16bit:8) else i16bit;
writeln;
write('Uns. 2 byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<8) or (i=10000) then write(i15bit:8) else i15bit;
writeln;
write('Signed byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<16) or (i=10000) then write(i8bit:4) else i8bit;
writeln;
write('Uns. byte: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<16) or (i=10000) then write(i7bit:4) else i7bit;
writeln;
write('Random bits: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<32) or (i=10000) then write(ord(i1bit):2) else i1bit;
writeln;
write('Signed Single: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<4) or (i=10000) then write(vni:16:7) else vni;
writeln;
write('Uns. Single: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<4) or (i=10000) then write(uni:16:7) else uni;
writeln;
write('Signed Double: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<2) or (i=10000) then write(dvni:32:15) else dvni;
writeln;
write('Unsigned Dble: ');
rinit(1234567,7654321);
for i:=1 to 10000 do
if (i<2) or (i=10000) then write(duni:32:15) else duni;
writeln;
end.